import request from '@/utils/request'

// 查询安全隐患上报列表
export function listReporting(query) {
  return request({
    url: '/patrol/reporting/list',
    method: 'get',
    params: query
  })
}

// 查询安全隐患上报详细
export function getReporting(id) {
  return request({
    url: '/patrol/reporting/' + id,
    method: 'get'
  })
}

// 新增安全隐患上报
export function addReporting(data) {
  return request({
    url: '/patrol/reporting',
    method: 'post',
    data: data
  })
}

// 修改安全隐患上报
export function updateReporting(data) {
  return request({
    url: '/patrol/reporting',
    method: 'put',
    data: data
  })
}

// 删除安全隐患上报
export function delReporting(id) {
  return request({
    url: '/patrol/reporting/' + id,
    method: 'delete'
  })
}

export function exportForm(query) {
  return request({
    url: '/patrol/reporting/export',
    method: 'get',
    params: query
  })
}

export function total() {
  return request({
    url: '/patrol/reporting/total',
    method: 'get',
  })
}
